import 'element-plus/dist/index.css'
import { createApp } from 'vue'
import App from './App.vue'
import router from '@/router'
import axios from 'axios'
import VueAxios from 'vue-axios'
import VueLazyload from 'vue-lazyload'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import utils from '@/utils'

const app = createApp(App)
const prefix = import.meta.env.VITE_BASE_URL
const pinia = createPinia()
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(router).use(ElementPlus).use(pinia).use(utils)
  .use(VueAxios, axios).use(VueLazyload, { loading: prefix + '/images/loading-bars.svg' }).mount('#app')
